
# source files
set(CMPV_SOURCES main.cpp mirroreditem.cpp mirrorview.cpp mirrorphotoviewer.cpp)

# headers files, specailly contains "Q_OBJECT" macro
set(CMPV_HDRS mirroreditem.h mirrorview.h mirrorphotoviewer.h)

# UI files
set(CMPV_FORMS mirrorview.ui mirrorphotoviewer.ui)

# resource files 
set(CMPV_RESOURCES eyecandy.qrc)

# add qt modules
SET(QT_USE_QTOPENGL TRUE)

QT4_WRAP_CPP(CMPV_HEADERS_MOC ${CMPV_HDRS})
QT4_WRAP_UI(CMPV_FORMS_HEADERS ${CMPV_FORMS})
QT4_ADD_RESOURCES(CMPV_RESOURCES_RCC ${CMPV_RESOURCES})

INCLUDE(${QT_USE_FILE})
ADD_DEFINITIONS(${QT_DEFINITIONS})
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})

message(${QT_LIBRARIES})
ADD_EXECUTABLE(CMPV ${CMPV_SOURCES} 
    ${CMPV_HEADERS_MOC} 
    ${CMPV_FORMS_HEADERS} 
    ${CMPV_RESOURCES_RCC})

TARGET_LINK_LIBRARIES(CMPV ${QT_LIBRARIES})

